<?php

namespace App\Http\Controllers;

use App\Library\Requests\Base\BasePageRequest;
use App\Library\Requests\Invite\InviteOrderPageRequest;
use App\Library\Service\InviteService;
use Illuminate\Http\JsonResponse;

class InviteController extends BaseController
{
    /**
     * @param InviteService $service
     */
    public function __construct(InviteService $service)
    {
        $this->service = $service;
    }

    /**
     * 邀请信息
     * @param BasePageRequest $request
     * @return JsonResponse
     *
     */
    public function list(BasePageRequest $request): JsonResponse
    {
        return $this->service->list($request);
    }

    /**
     * 邀请二级订单列表
     * @param InviteOrderPageRequest $request
     * @return JsonResponse
     *
     */
    public function orderPage(InviteOrderPageRequest $request): JsonResponse
    {
        return $this->service->orderPage($request);
    }
}
